package huawei.js2025;

import java.util.*;
import java.util.stream.Collectors;

/**
 * 匿名信
 */
public class Question12 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String newspaper = sc.nextLine();
        String anonymousLetter = sc.nextLine();

        Map<String, Integer> newsWordMap = new HashMap<>();
        for (String newsWord : newspaper.trim().split(" ")) {
            List<Character> characterList = new ArrayList<>();
            for (char c : newsWord.toCharArray()) {
                characterList.add(c);
            }
            characterList.sort(Character::compareTo);
            StringBuilder sb = new StringBuilder();
            for (char c : characterList) {
                sb.append(c);
            }
            newsWordMap.put(sb.toString(), newsWordMap.getOrDefault(characterList.toString(), 0) + 1);
        }


        Map<String, Integer> anonymousLetterMap = new HashMap<>();
        for (String anonymous : anonymousLetter.trim().split(" ")) {
            List<Character> characterList = new ArrayList<>();
            for (char c : anonymous.toCharArray()) {
                characterList.add(c);
            }
            characterList.sort(Character::compareTo);
            StringBuilder sb = new StringBuilder();
            for (char c : characterList) {
                sb.append(c);
            }
            anonymousLetterMap.put(sb.toString(), anonymousLetterMap.getOrDefault(characterList.toString(), 0) + 1);
        }


        for (String word : anonymousLetterMap.keySet()) {
            if (!newsWordMap.containsKey(word) || newsWordMap.get(word) > anonymousLetterMap.get(word)) {
                System.out.println(false);
                return;
            }
        }

        System.out.println("true");
    }
}
